package com.xnx3.banmahuishou.core.entity;

import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import com.xnx3.j2ee.entity.BaseEntity;

/**
 * 垃圾具体商品的价格管理，每个代理商都有一套自己的价格
 * @author 王晓龙
 */
@Entity()
@Table(name = "laji_goods_price")
public class GoodsPrice extends BaseEntity implements java.io.Serializable {
	private Integer id;	//自动编号
	private Integer agencyid;	//代理商id，这个价格是属于哪个代理商的，对应 agency.userid
	private Integer minMoney;	//最小价格，单位是分
	private Integer maxMoney;	//最大价格，单位是分
	private Integer goodsid;	//这个价格对应着哪个商品，对应 goods.id
	
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	@Column(name = "agencyid", columnDefinition="int(11) COMMENT '代理商id，这个价格是属于哪个代理商的，对应 agency.userid' default '0'")
	public Integer getAgencyid() {
		return agencyid;
	}
	public void setAgencyid(Integer agencyid) {
		this.agencyid = agencyid;
	}
	@Column(name = "min_money", columnDefinition="int(11) COMMENT '最小价格，单位是分' default '0'")
	public Integer getMinMoney() {
		return minMoney;
	}
	public void setMinMoney(Integer minMoney) {
		this.minMoney = minMoney;
	}
	@Column(name = "max_money", columnDefinition="int(11) COMMENT '最大价格，单位是分' default '0'")
	public Integer getMaxMoney() {
		return maxMoney;
	}
	public void setMaxMoney(Integer maxMoney) {
		this.maxMoney = maxMoney;
	}
	@Column(name = "goodsid", columnDefinition="int(11) COMMENT '这个价格对应着哪个商品，对应 goods.id' default '0'")
	public Integer getGoodsid() {
		return goodsid;
	}
	public void setGoodsid(Integer goodsid) {
		this.goodsid = goodsid;
	}
	@Override
	public String toString() {
		return "GoodsPrice [id=" + id + ", agencyid=" + agencyid + ", minMoney=" + minMoney + ", maxMoney=" + maxMoney
				+ ", goodsid=" + goodsid + "]";
	}
	
}
